SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE VIEW dbo.vEvents
AS
SELECT     dbo.Event.ID, dbo.Event.Name, dbo.Event.StartDate, dbo.Event.EndDate, dbo.Event.Description, dbo.Event.Comments, dbo.Workshop.Name AS Expr1, 
                      dbo.Workshop.Comments AS Expr2, dbo.University.Name AS Expr3, dbo.University.Location, dbo.Sponsor.ID AS Expr4, dbo.Sponsor.Name AS Expr5, 
                      dbo.Sponsor.Website, dbo.Sponsor.Email, dbo.Sponsor.ContactNumber, dbo.Sponsor.Comments AS Expr6, dbo.Gallery.ID AS Expr7, dbo.Gallery.Name AS Expr8, 
                      dbo.Gallery.Type, dbo.Gallery.Location AS Expr9, dbo.Gallery.Comments AS Expr10
FROM         dbo.Event INNER JOIN
                      dbo.EventSponsor ON dbo.Event.ID = dbo.EventSponsor.EventID INNER JOIN
                      dbo.EventUniversity ON dbo.Event.ID = dbo.EventUniversity.EventID INNER JOIN
                      dbo.Gallery ON dbo.Event.ID = dbo.Gallery.EventID INNER JOIN
                      dbo.Workshop ON dbo.Event.ID = dbo.Workshop.ID INNER JOIN
                      dbo.University ON dbo.EventUniversity.UniversityID = dbo.University.ID INNER JOIN
                      dbo.Sponsor ON dbo.EventSponsor.SponsorID = dbo.Sponsor.ID
GO
EXEC sp_addextendedproperty N'MS_DiagramPane1', N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
Begin DesignProperties = 
   Begin PaneConfigurations = 
      Begin PaneConfiguration = 0
         NumPanes = 4
         Configuration = "(H (1[50] 4[15] 2[28] 3) )"
      End
      Begin PaneConfiguration = 1
         NumPanes = 3
         Configuration = "(H (1 [50] 4 [25] 3))"
      End
      Begin PaneConfiguration = 2
         NumPanes = 3
         Configuration = "(H (1 [50] 2 [25] 3))"
      End
      Begin PaneConfiguration = 3
         NumPanes = 3
         Configuration = "(H (4 [30] 2 [40] 3))"
      End
      Begin PaneConfiguration = 4
         NumPanes = 2
         Configuration = "(H (1 [56] 3))"
      End
      Begin PaneConfiguration = 5
         NumPanes = 2
         Configuration = "(H (2 [66] 3))"
      End
      Begin PaneConfiguration = 6
         NumPanes = 2
         Configuration = "(H (4 [50] 3))"
      End
      Begin PaneConfiguration = 7
         NumPanes = 1
         Configuration = "(V (3))"
      End
      Begin PaneConfiguration = 8
         NumPanes = 3
         Configuration = "(H (1[56] 4[18] 2) )"
      End
      Begin PaneConfiguration = 9
         NumPanes = 2
         Configuration = "(H (1 [75] 4))"
      End
      Begin PaneConfiguration = 10
         NumPanes = 2
         Configuration = "(H (1[66] 2) )"
      End
      Begin PaneConfiguration = 11
         NumPanes = 2
         Configuration = "(H (4 [60] 2))"
      End
      Begin PaneConfiguration = 12
         NumPanes = 1
         Configuration = "(H (1) )"
      End
      Begin PaneConfiguration = 13
         NumPanes = 1
         Configuration = "(V (4))"
      End
      Begin PaneConfiguration = 14
         NumPanes = 1
         Configuration = "(V (2))"
      End
      ActivePaneConfig = 0
   End
   Begin DiagramPane = 
      Begin Origin = 
         Top = 0
         Left = 0
      End
      Begin Tables = 
         Begin Table = "EventSponsor"
            Begin Extent = 
               Top = 152
               Left = 595
               Bottom = 241
               Right = 755
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "EventUniversity"
            Begin Extent = 
               Top = 7
               Left = 198
               Bottom = 107
               Right = 358
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "Gallery"
            Begin Extent = 
               Top = 9
               Left = 780
               Bottom = 169
               Right = 940
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "Workshop"
            Begin Extent = 
               Top = 132
               Left = 197
               Bottom = 251
               Right = 357
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "University"
            Begin Extent = 
               Top = 142
               Left = 2
               Bottom = 246
               Right = 162
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "Sponsor"
            Begin Extent = 
               Top = 158
               Left = 763
               Bottom = 277
               Right = 927
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "Event"
            Begin Extent = 
               Top = 32
               Left = 397
               Bottom = 216
               Right = 571
            End
            Disp', 'SCHEMA', N'dbo', 'VIEW', N'vEvents', NULL, NULL
GO
EXEC sp_addextendedproperty N'MS_DiagramPane2', N'layFlags = 280
            TopColumn = 0
         End
      End
   End
   Begin SQLPane = 
   End
   Begin DataPane = 
      Begin ParameterDefaults = ""
      End
   End
   Begin CriteriaPane = 
      Begin ColumnWidths = 11
         Column = 1440
         Alias = 900
         Table = 1170
         Output = 720
         Append = 1400
         NewValue = 1170
         SortType = 1350
         SortOrder = 1410
         GroupBy = 1350
         Filter = 1350
         Or = 1350
         Or = 1350
         Or = 1350
      End
   End
End
', 'SCHEMA', N'dbo', 'VIEW', N'vEvents', NULL, NULL
GO
DECLARE @xp int
SELECT @xp=2
EXEC sp_addextendedproperty N'MS_DiagramPaneCount', @xp, 'SCHEMA', N'dbo', 'VIEW', N'vEvents', NULL, NULL
GO
